{% extends "base.html" %}
{% load ietf_filters static %}
{% block pagehead %}
    <link rel="stylesheet" href="{% static "ietf/css/list.css" %}">
{% endblock %}
{% block title %}History for Liaison Statement - {{ liaison.title }}{% endblock %}
{% block content %}
    <h1>
        History for Liaison Statement
        <br>
        <small class="text-body-secondary">{{ liaison.title }}</small>
    </h1>
    {% include "liaisons/detail_tabs.html" %}
    {% if user|has_role:"Area Director,Secretariat,IANA,RFC Editor" %}
        <p class="buttonlist">
            <a class="btn btn-primary"
               href="{% url "ietf.liaisons.views.add_comment" object_id=liaison.id %}"
               title="Add comment to history">
                Add comment
            </a>
        </p>
    {% endif %}
    <table class="table table-sm table-striped history tablesorter">
        <thead>
            <tr>
                <th scope="col" data-sort="date">Date</th>
                <th scope="col" data-sort="type">Type</th>
                <th scope="col" data-sort="by">By</th>
                <th scope="col" data-sort="text">Text</th>
            </tr>
        </thead>
        {% if events %}
            <tbody>
                {% for e in events %}
                    <tr>
                        <td>{{ e.time|date:"Y-m-d" }}</td>
                        <td>
                            {{ e.type }}
                            {% if e.response_due and e.response_past_due %}
                                <i class="bi bi-exclamation-circle" title="Response overdue"></i>
                            {% endif %}
                        </td>
                        <td>{{ e.by }}</td>
                        <td>{{ e.desc|format_history_text }}</td>
                    </tr>
                {% endfor %}
            </tbody>
        {% endif %}
    </table>
{% endblock %}
{% block js %}
    <script src="{% static "ietf/js/list.js" %}"></script>
{% endblock %}